﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Saker.Web.Controls
{
    public partial class Pager : System.Web.UI.UserControl
    {
        public delegate void QueryDataHandler();
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        public event QueryDataHandler PageChanged;
        protected void Pager_PageChanged(object src, EventArgs e)
        {
            if (PageChanged != null)
                PageChanged();
        }
        public int PageSize
        {
            set
            {
                pg.PageSize = value;
            }
            get
            {
                return pg.PageSize;
            }
        }
        public int CurrentPageIndex
        {
            set
            {
                pg.CurrentPageIndex = value;
            }
            get
            {
                return pg.CurrentPageIndex;
            }
        }
        public int RecordCount
        {
            set
            {
                pg.RecordCount = value;
            }
            get
            {
                return pg.RecordCount;
            }
        }
        public string CustomInfoHTML
        {
            set { pg.CustomInfoHTML = value; }
            get { return pg.CustomInfoHTML; }
        }
    }
}